-
Notifications
You must be signed in to change notification settings - Fork 465
Per-platform binary packages #7395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
b659400
to
8f1f91c
Compare
@zth I would assume this will require some LSP server changes as well? |
75f9a9d
to
29aa865
Compare
2ae6210
to
887d984
Compare
@@ -482,6 +474,11 @@ jobs: | |||
path: | | |||
rescript-${{ env.rescript_version }}.tgz | |||
rescript-std-${{ env.rescript_version }}.tgz | |||
rescript-linux-x64-${{ env.rescript_version }}.tgz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to use GitHub's package registry for nightly builds
eeb3455
to
5f53c6d
Compare
a6f2e53
to
9ac523d
Compare
Each platform package will expose binary locations, making it easier to handle. import { binDir, binPaths } from "@rescript/linux-x64" |
34223f4
to
e7c1064
Compare
// Filename.parent_dir_name // "lib" // "ocaml" | ||
let exe_path = Sys.executable_name in | ||
if Ext_string.contain_substring exe_path ("node_modules" // "@rescript") then | ||
(* node_modules/@rescirpt/{platform}/bins *) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(* node_modules/@rescirpt/{platform}/bins *) | |
(* node_modules/@rescript/{platform}/bins *) |
// Filename.parent_dir_name // Filename.parent_dir_name // "rescript" | ||
// "lib" // "ocaml" | ||
else | ||
(* node_modules/rescirpt/{platform} *) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(* node_modules/rescirpt/{platform} *) | |
(* node_modules/rescript/{platform} *) |
I think that would definitely make sense. 👍 |
Hi @cometkim, this didn't really work for when I installed the packages using a relative path:
I'm guessing I'm only having this because the symlink thing doesn't work locally. I'm also a fan of having Once I downloaded the packages from the GitHub action, it did all work as expected. Tooling broke as I suspected, but we can deal with that. Wouldn't consider that a blocker. |
Workaround for tooling would be to set: "rescript.settings.platformPath": "/Users/my-user/Projects/my-project/node_modules/@rescript/darwin-arm64/bin"
|
@nojaf This is expected behavior of Make sure your package manager supports other protocols that can handle it properly. If you are using Yarn, you can use git or tgz protocol might be a workaround. |
Well, that is not really a satisfying answer. Can't we just copy the actual binaries to |
Getting rid of symlinks would be good. I'll try. But then I'm not sure about the file or link still. |
Resolves #6133 , Partially #6183
Use symbolic links in dev and replace them with real binaries during the packaging process.